import { request } from "../../utils/request";
import config from "../../utils/config";
const app = getApp()
Page({
    data: {
        picUrl: config.picUrl,
        custom: wx.getMenuButtonBoundingClientRect(),
        user:wx.getStorageSync('userInfo'),
        message:{},
        id:null
    },
    onLoad(options) {
        this.setData({id:options.id})
        this.setData({user:wx.getStorageSync('userInfo')})
        this.getContent()
        wx.hideShareMenu()
    },
    getContent(){
        request({
            url:'/miniprogram/user/getMessageDetail',
            data:{id:this.data.id,user_id:this.data.user.id}
        }).then(res=>{
            if(res.data.img != ''){
                res.data.img = res.data.img.split(',')
            }else{
                res.data.img = []
            }
            this.setData({message:res.data})
            this.getUserInfo()
        })
    },
})